<?php

namespace App\Http\Requests;

use App\Http\Requests\Request;

class SmsRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        $data = Request::all();
        $rules = [
            'blade' => 'required|numeric',
            'type'  => 'required',
        ];


        return $rules;
    }

    public function attributes()
    {
        $attributes = array(
            'blade' => '短信模板',
            'type'  => '接受者人群',
        );

        return $attributes;
    }

    public function messages()
    {
        $messages = [
            'required'       => ':attribute为必填选项',
            'numeric'        => ':attribute必须为数字',
        ];

        return $messages;
    }
}
